The idiomatic expression "to stay out of trouble" means to avoid engaging in activities or behaviors that could lead to problems, difficulties or negative consequences. It implies maintaining a safe distance from situations and people who may cause harm or disruption.